
const path = require("path");

module.exports = {
      entry: path.resolve("main.js"),
      output: {
            path: path.resolve(__dirname, "dist"),
            filename: "build.js"
      },
      module:{
            rules:[{ 
                        test: /.(png|jpg|gif|jpeg)$/,
                        use: "file-loader", // 解析文件 
                  }]
      },
      devtool: "source-map",
      devServer:{
            contentBase:  path.resolve(__dirname, "dist"),
            hot: true
      }
}